<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href = "/tubu/Public/Css/common.css" type = "text/css" rel = "stylesheet"/>
<title>约吧管理</title>
</head>
<body>
<div id="head">
	<div id="logo"> <img src="/tubu/Public/Img/logo.png" /></div>
	<div id="headguidance">
		<ul id="headnav">
		 
       	 <li><a href="/tubu/index.php/Admin/User/index">用户管理</a></li>
       	 <li><a href="/tubu/index.php/Admin/Scenic/index">景区管理</a></li>
       	 <li><a href="/tubu/index.php/Admin/Point/index">定点管理</a></li>
       	 <li><a href="/tubu/index.php/Admin/ScenicTicket/index">门票管理</a></li>
       	 <li><a href="/tubu/index.php/Admin/ScenicOrder/index">订单管理</a></li>
       	 <li><a href="/tubu/index.php/Admin/Publish/index">约吧管理</a></li>
       	 <li><a href="/tubu/index.php/Admin/Entertainment/index">娱乐管理</a></li>
		</ul>
	</div>
</div>
<div>
	<div id="userName">
			欢迎<?php echo ($_SESSION['username']); ?>管理员。<a href="/tubu/index.php/Admin/Login/logout">退出登录</a>
	</div>
	<div id="content">
		
<link href = "/tubu/Public/Css/publish.css" type = "text/css" rel = "stylesheet"/>
<script type="text/javascript" src="/tubu/Public/Js/jquery-1.9.1.min.js"></script>
	<div id="content" align="center">		
		<div id="user" >
			<p style="margin-left:-650px; font-size:20px; color:#1d353f; font-weight:bold;">约吧列表</p>
			<div id='addBtn'><input type="button" value="添加约吧" id="btn" onclick="javascript:window.location.href = '/tubu/index.php/Admin/Publish/add';"></div>
			<hr width="750px"/>
			<table style="width:750px;"">
			<tr style="color:#1d353f;"><th>序号</th><th>昵称</th><th>内容</th><th>发布时间</th><th>图片</th><th>操作</th><tr>
			<?php if(is_array($list)): foreach($list as $key=>$publish): ?><tr>
				<td style="width:38px;"><?php if(($_GET['p'] == 0)): echo ++$i; else: echo ++$i + ($_GET['p']-1) * 7; endif; ?></td>
				<td style="width:70px;"><?php echo ($publish['nickname']); ?></td>
				<td style="width:120px;"><a href="javascript:void(0)" style='text-decoration:none;' title="<?php echo ($publish['allcontent']); ?>"><?php echo ($publish['content']); ?></a></td>
				<td style="width:150px;"><?php echo (date('Y-m-d H:i:s',$publish['ctime'])); ?></td>
				<td style="width:280px;"><img height="90px" width="90px"src="<?php echo ($publish['pic0']); ?>"/><img height="90px" width="90px" src="<?php echo ($publish['pic1']); ?>"/><img height="90px" width="90px" src="<?php echo ($publish['pic2']); ?>"/></td>
				<td><a href="javascript:void(0)" onclick="scPublish(<?php echo ($publish['id']); ?>)">
					<img src="/tubu/Public/Img/delete.png" /></a></td>
			</tr><?php endforeach; endif; ?>	
			</table>
		</div>
		<div id="count" align="center">共<?php echo ($count); ?>条</div>	
		<div id="page" align="center"><?php echo ($page); ?></div>	
	</div>
<script type="text/javascript">
var delPublish = '<?php echo U("Publish/del",'','');?>';
function scPublish(i){
	var id = i;
	$.post(delPublish,{id:id},
		function(data){
			if(data.status==1){
				alert("删除成功！");
				setTimeout(function(){window.location.reload();},1000);
			}else{
				alert("删除成功！");
			}
		},
	'json');
}
function test(){
	alert(1);
}
</script>

	</div>
</div>
<!--<div id="foot">
	<div id="companyInfo">
		<p>名称：阡陌森创意设计有限公司&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;邮箱：qianmosen@163.com</p>
		<p>地址：浙江省温州市鹿城区府东路物华大厦6B &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;网址：http://www.arqm.cn</p>
	</div>
  <div id="copyright">
  	  <p>Copyright © 2014-2016 Arqm.Cn All Rights Reserved</p>
  </div>
</div>-->
</body>
</html>